Skip to content

Conversation

@pmenzel
Copy link
Collaborator

Install with sudo bee install sudo bee update lld-22.1.8-0.

$ lld --version
lld is a generic driver.
Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld (WebAssembly) instead

[Description](https://lld.llvm.org/):

> LLD is a linker from the LLVM project that is a drop-in replacement
> for system linkers and runs much faster than them. It also provides
> features that are useful for toolchain developers.

Build lld from the llvm-project monorepo as a standalone build against
the installed llvm 22.1.8, like `compiler-rt.be0`, reusing the same
tarball on beehive. Also build with `-G Ninja`.

`LLVM_USE_SYMLINKS` is defined only in `llvm/CMakeLists.txt`, so in a
standalone build it is unset and AddLLVM copies the binary for every
flavour:

    [132/132] … && /usr/bin/cmake -E copy …/build/bin/lld …/build/./bin/lld-link && … -E copy …/bin/lld …/bin/ld.lld && … -E copy …/bin/lld …/bin/ld64.lld && … -E copy …/bin/lld …/bin/wasm-ld

    -rwxr-xr-x root/root   8264544 /usr/bin/wasm-ld
    -rwxr-xr-x root/root   8264544 /usr/bin/ld64.lld
    -rwxr-xr-x root/root   8264544 /usr/bin/ld.lld
    -rwxr-xr-x root/root   8264544 /usr/bin/lld-link
    -rwxr-xr-x root/root   8264544 /usr/bin/lld

Set it explicitly, so that ld.lld, ld64.lld, lld-link and wasm-ld are
symbolic links to lld, which shrinks the package from 15.9 MB to
5.8 MB.

Tests are disabled, as they need llvm_gtest, which llvm does not
install.

Tested by building on MXQ (quokka), and linking C, C++, ThinLTO and a
shared object with `clang --ld-path=…/ld.lld` and
`gcc -fuse-ld=lld -B…/usr/bin`, all reporting `Linker: LLD 22.1.8`.

Assisted-by: claude-opus-5.5 (Claude Code)
@pmenzel Paul Menzel (pmenzel) merged commit eee04be into master Oct 14, 2026
@pmenzel Paul Menzel (pmenzel) deleted the add-lld-22.1.8 branch October 14, 2026 06:59
Sign in to join this conversation on GitHub.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant